CREATE TABLE [dbo].[ResourceResources_EventEvents]
(
[Events] [uniqueidentifier] NULL,
[Resources] [uniqueidentifier] NULL,
[OID] [uniqueidentifier] NOT NULL ROWGUIDCOL,
[OptimisticLockField] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ResourceResources_EventEvents] ADD CONSTRAINT [PK_ResourceResources_EventEvents] PRIMARY KEY CLUSTERED  ([OID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iEvents_ResourceResources_EventEvents] ON [dbo].[ResourceResources_EventEvents] ([Events]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [iEventsResources_ResourceResources_EventEvents] ON [dbo].[ResourceResources_EventEvents] ([Events], [Resources]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iResources_ResourceResources_EventEvents] ON [dbo].[ResourceResources_EventEvents] ([Resources]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ResourceResources_EventEvents] WITH NOCHECK ADD CONSTRAINT [FK_ResourceResources_EventEvents_Events] FOREIGN KEY ([Events]) REFERENCES [dbo].[Event] ([Oid]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[ResourceResources_EventEvents] WITH NOCHECK ADD CONSTRAINT [FK_ResourceResources_EventEvents_Resources] FOREIGN KEY ([Resources]) REFERENCES [dbo].[Resource] ([Oid]) NOT FOR REPLICATION
GO
